<!doctype html>
<title>Upload new File</title>
{% if name %}
  <h1>on chaturbate  :{{ name }}</h1>
{% else %}
  <h1>Upload new File</h1>
{% end %}
<form method=post id="form" action="/" enctype=multipart/form-data>
    <input type="file" id="file" name="file">
</form>

<script>
document.getElementById("file").onchange = function(){document.getElementById("form").submit();};

const form = document.getElementById("form");
const fileInput = document.getElementById("file");

window.addEventListener('paste', e => {
  fileInput.files = e.clipboardData.files;
  setTimeout(function(){document.getElementById("form").submit();},4000)
});
</script>

{% if name %}
  <img src='/uploads/{{name}}.avif' width="500" height="600" alt="sneed"  onclick="document.getElementById('file').click();" />
  <button onclick="window.location.href='/sendcock_enter'" style="width: 500px; height: 600px;">hotkey: press Enter, (on computeer)</button>
  <!-- <button onclick="(xhr=new XMLHttpRequest()).open('GET','/sendcock_enter',1);xhr.send()" style="width:500px;height:600px;">Go to God</button> -->
{% end %}
